package com.hong.singlemode;

/**
 * @Description:单例模式-饿汉
 *  由于饿汉式天生主线程安全所以不用考虑线程问题
 * @Author: csh
 * @CreateDate: 2018/7/13$ 10:55$
 * @Version: 1.0
 */
public class SingletonHungry {
    /**构造方法*/
    private SingletonHungry() {}
    /**初始化就创建*/
    private static final SingletonHungry singletonHungry = new SingletonHungry();

    public static SingletonHungry getSingleton(){
        return  singletonHungry;
    }
}
